package com.skyable.device.feign;

import com.skyable.common.common.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author GaoYuan
 * @date 2019/12/3 13:59
 * @desc 托管服务Feign接口
 */
@FeignClient(name = "cloud-server")
public interface ServerFeignApi {

    /**
     * 根据ID获取UDS服务信息
     * @param serviceId
     * @return
     */
    @RequestMapping("/uds/view/{id}")
    ResponseResult getUdsService(@PathVariable("id") Long serviceId);

    /**
     * 更新UDS转发地址
     * @param serviceId
     * @param dataUrl
     * @param statusUrl
     * @return
     */
    @RequestMapping("/uds/update")
    ResponseResult updateUdsRedirectUrl(@RequestParam("serviceId") Long serviceId, @RequestParam("dataUrl") String dataUrl, @RequestParam("statusUrl") String statusUrl);

}
